// src\redux\reducers\LoadingReducer.js
// 专用于管理加载效果的reducer

export const LoadingReducer = (prevState = {
    isLoading: false
}, action) => {
    // console.log("LoadingReducer",action);
    let { type, payLoad } = action;
    switch (type) {
        case 'change_loading':
            let newState = { ...prevState };
            newState.isLoading = payLoad;
            return newState;
        default:
            return prevState;
    }
}